/*
 * CcSymbol.h
 *
 *  Created on: 2012/04/28
 *      Author: guanxiaoying
 */

#ifndef CCSYMBOL_H_
#define CCSYMBOL_H_

/*  KIND_SYMDEFINFO シンボル定義情報テーブル */
/*  記憶域クラス指定子　*/
#define CLASS_EXTERN		1	/* extern				*/
#define CLASS_AUTO			2	/* auto ( or nothing )*/
#define CLASS_STATIC		3	/* static				*/
#define CLASS_REGISTER		4	/* register			*/
#define CLASS_TYPEDEF		5	/* typedef			*/

/*　名前空間　*/
#define xNAMESPACE_ORD   		1
#define xNAMESPACE_TAG   		2
#define xNAMESPACE_LABEL 		3
#define xNAMESPACE_MEM   		4
#define xNAMESPACE_ARG   		5
#define xNAMESPACE_OTHER 		6
#define xNAMESPACE_TYPENAME 		xNAMESPACE_OTHER

/*　有効範囲　*/
#define xSCOPE_FILE  		1
#define xSCOPE_FUNC    		2
#define xSCOPE_BLOCK     	3



#define   CcSymIsTypedef( sym ) (stSymbolInfoAccess.kind.get( sym ) == SYMBOL_KIND_TYPEDEFID)

extern VOID CcSymInitial(VOID);
extern AST  CcSymFindDefinition( PSZ name, U2 nameSpace, AST * loc_of_block ) ;
extern VOID CcSymCopy( AST astOrg, AST astDst );
extern AST CcSymNewMember( PSZ name );
extern AST CcSymNewParameter( PSZ name );
extern AST CcSymNewLabel( PSZ name );
extern AST CcSymNewTagName( PSZ name );
extern AST CcSymNewTypedefID( PSZ name );
extern AST CcSymNewEnumConst( PSZ name );
extern AST CcSymNewFunction( PSZ name );
extern AST CcSymNewVariable( PSZ name );
extern VOID CcSymSetToFunction( AST astSym );
extern VOID CcSymSetToVariable( AST astSym );
extern VOID CcSymSetToTypedefId( AST astSym );
extern AST CcSymNewUnknown( PSZ name );
#endif /* CCSYMBOL_H_ */
